//
//  RDDataParser.h
//  eCourseApp
//
//  Created by 飞猪 on 2018/8/26.
//  Copyright © 2018年 Facebook. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RDChapterModel.h"
#import "RDConfiguration.h"
#import "RDPageModel.h"
#import "RDNETChapterModel.h"

typedef void(^ChapterBlock)(NSArray<NSString *> *, NSArray<RDChapterModel *> *);
typedef void(^PageBlock)(NSInteger, RDPageModel *, BOOL);

@interface RDDataParser : NSObject

- (void)parseChapterFromBook:(NSString *)path completeHandler:(ChapterBlock)chapterBlock;


- (NSAttributedString *)attributedStringFromChapterModel:(RDChapterModel *)chapter config:(RDConfiguration *)config;

- (void)cutPageWith:(NSAttributedString *)attrString config:(RDConfiguration *)config completeHandler:(PageBlock)pageBlock;

@end
